home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Help: crash when doing fprintf
- Date: Mon, 15 Jan 96 11:42:03 GMT
- Organization: none
- Message-ID: <821706123snz@genesis.demon.co.uk>
- References: <DL74rA.L5v@info.physics.utoronto.ca>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <DL74rA.L5v@info.physics.utoronto.ca>
- olivers@helios.physics.utoronto.ca "Oliver Schonborn" writes:
-
- >It crashes deep inside the fprintf. A trace with the debugger
- >indicates where (main called _fprintf which called _wrtchk which
- >called _findbuf which called malloc):
-
- Crashing in malloc is a very strong indication your program corrupted the
- heap earlier in its execution. CHeck that your code doesn't write outside
- array bounds, use objects after they have been freed or free objects that
- weren't allocated by malloc/calloc/realloc.
-
- It is quite normal for stdio functions to call malloc. They typically do
- it to allocate the I/O buffer when it is first needed.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-